---
title: "Update payment"
method: PUT
path: "/payments/{id} "
---

# Update payment

`PUT /payments/{id} `

## Path parameters

- `id` string, required

## Headers

- `Content-Type` string, required
- `Host` string, required
- `Date` string, required
- `Digest` string, required
- `Authorization` string, required
- `x-satispay-deviceinfo` string
- `x-satispay-devicetype` 'SMARTPHONE' | 'TABLET' | 'CASH REGISTER' | 'POS' | 'PC' | 'ECOMMERCE_PLUGIN'
- `x-satispay-os` string
- `x-satispay-osv` string
- `x-satispay-apph` string
- `x-satispay-appn` string
- `x-satispay-appv` string
- `x-satispay-tracking-code` string

## Request body

- object
  - `action` 'ACCEPT' | 'CANCEL' | 'CANCEL_OR_REFUND', required — The action to execute on a specific payment. <br> <br> `ACCEPT` <br> This action can be used to accept `PENDING` payments. <br> <br> `CANCEL` <br> This action can be used to cancel `PENDING` payments. <br> <br> `CANCEL_OR_REFUND` <br> This action can be used to cancel `PENDING` payments. <br> Or to refund a payment in status `ACCEPTED`. <br> <br> We suggest to execute this action only if you don't know the actual status of the payment. <br> For example if you received a timeout or an HTTP `500`. <br> <br> Depending on the actual status of the payment, you will receive a different outcome and response.
  - `payment_method_options` object
    - `meal_voucher` object — The veal vouchers settings object.
      - `enable` boolean — Enable or disable Meal Vouchers for this payment. <br> <br> If you don't specify this parameter, and if your shop has Meal Vouchers enabled, by default it will be `true`.
      - `max_amount_unit` integer — The maximum amount payable with Meal Vouchers in cents. <br> <br> This parameter is applicable when a customer purchases both food and non-food items. For instance, while the total grocery bill may amount to `€15.00`, the specific cost for food items might be of just `€6.50`. <br> <br> To represent the amount `€6.50`, you should multiply it by `100`, resulting in `650` cents.
      - `max_number` integer — The maximum number of Meal Vouchers usable for this payment. <br> <br> By default this parameter is set to `8`, in compliance with Italian law. <br> <br> This parameter is applicable when a customer intends to make a payment using multiple meal voucher brands. For instance, the customer might use `3` Meal Vouchers from other brands and `5` Meal Vouchers from Satispay, resulting in a total of `8` Meal Vouchers. In the example above, the `max_number` parameter should be set to `5`, since `3` Meal Vouchers are from another brand.
  - `payment_options` object
    - `partial_payment` boolean — Enable or disable partial payments. <br> <br> When partial payment is enabled, customers have the flexibility to pay a portion of the total amount using Meal Vouchers, without the need to use e-money funds from the Satispay wallet. <br> Customers can decide to use alternative payment methods to cover the remaining amount. <br> <br> If this property is set to `true`, the `amount_unit` response property could change when the payment transitions to `ACCEPTED` status. <br> For example, the payment could be created at `12,40€`, but the consumer availability could just be of `8,00€` of Meal Vouchers. <br> In this case, the `amount_unit` response property will be of `800` cents corresponding in `8,00€`. <br> <br> When partial payment is disabled, customers are required to pay the entire amount using Satispay, using a combination of both Meal Vouchers and e-money funds from their Satispay wallet. <br> In this case, if the customer has insufficient funds, the transaction will not be successful.

## Response `200`

OK

- object
  - `id` string — The unique payment id. <br> <br> This can be used for every eventual subsequent operations on the payment, including refunds.
  - `type` string — The current payment type. <br> <br> `TO_BUSINESS` <br> This type is used for payments from a consumer to a merchant. <br> <br> `REFUND_TO_BUSINESS` <br> This type is used for payments from a merchant to a consumer (e.g. refunds).
  - `amount_unit` integer — The payment amount in cents. <br> <br> For example, the amount `€12.40` is being represented as `1240` cents.<br> <br> When using the parameter `payment_options.partial_payment` = `true` <br> this final amount could change when the payment will transition to `ACCEPTED` status.
  - `currency` 'EUR' — The payment currency.
  - `status` string — The current payment status. <br> <br> `ACCEPTED` <br> The payment has been accepted succesfully. <br> Beware: if you use the `CANCEL_OR_REFUND` action and you receive back an `ACCEPTED` status, this means that the payment has been successfully refunded. <br> <br> `CANCELED` <br> The payment has been correctly canceled. <br> Beware: if you use the `CANCEL_OR_REFUND` action and you receive back a `CANCELED` status, this means that the payment has been successfully canceled.
  - `expired` boolean — The current payment expiration status. <br> <br> It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
  - `metadata` object — The additional metadata for the payment.
  - `sender` object — The sender payment actor.
    - `id` string — The unique sender id. <br> <br> This will only be available once the payment will be matched with a consumer.
    - `type` string — The sender type. <br> <br> `CONSUMER` <br> This sender type is used when the payment goes from a consumer to a merchant. <br> <br> `SHOP` <br> This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
    - `name` string — The sender name. <br> <br> This will only be available once the payment will be matched with a consumer.
  - `receiver` object — The receiver payment actor.
    - `id` string — The unique receiver id.
    - `type` string — The receiver type. <br> <br> `CONSUMER` <br> This receiver type is used when the payment goes from a merchant to a consumer. <br> <br> `SHOP` <br> This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
  - `insert_date` string — The UTC payment creation datetime.
  - `expire_date` string — The UTC payment expiration datetime.
  - `payment_method` object
    - `meal_voucher` object — The Meal Voucher payment part. <br> <br> This property is available only when: <br> - the payment is `ACCEPTED`. <br> - the payment contains Meal Vouchers in it.
      - `amount_unit` integer — The total amount of Meal Vouchers in this payment, in cents. <br> <br> For example, the amount `€8.00` is being represented as `800` cents.
      - `number` integer — The total number of Meal Vouchers in this payment. <br> <br> As per italian law, it can't be higher than `8` Meal Vouchers per payment.

## Other responses

- `400` — 400 Bad Request
- `401` — 401 Unauthorized
- `403` — 403 Forbidden or invalid authorization header
- `404` — 404 Resource not found

---

[API](https://skmtc.net/satispay/apis/satispay-gbusiness-api.md) · [All operations](https://skmtc.net/satispay/apis/satispay-gbusiness-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/satispay/satispay-gbusiness-api/versions/f91f20a37e6f/schema)
